package com.sinry.common.core.exceptions.exception;

import com.sinry.common.core.exceptions.IResponseEnum;

/**
 * @author linxinlei
 * @project sinry-cloud
 * @description 基础异常类
 * @date 2022/5/28
 **/
public class BaseException extends Exception {

    final IResponseEnum responseEnum;

    final String message;

    public BaseException(IResponseEnum responseEnum, String message) {
        super(message);
        this.responseEnum = responseEnum;
        this.message = message;
    }

    public BaseException(IResponseEnum responseEnum, String message, Throwable cause) {
        super(message, cause);
        this.responseEnum = responseEnum;
        this.message = message;
    }
}
